const { readFile, baseUrl1, request } = require('../base.js');

/* 查询遗漏
* type: 类型,
value: 数字拼接字符
*/
module.exports = async function findOmission(type = 'klb', value = "") {
    let arr = value.split(',')
    let params = {
      "tab": type,
      "zd":"number",
      "i": arr.length,
      "value": "",
      "data1": "16",
      "data2": "37",
      "data3": "",
      "data4": "",
      "data5": "",
      "data6": ""
    }
    arr.map((val,index)=>{
      params['data'+(index+1)] = val*1 < 10 ? '0'+val*1 : val*1
    })
    // console.log(params)
    try {
      const url = `${baseUrl1}/lottery/demo/findl`;
      let res = await request({
        url,
        headers: {
            "content-type": "application/json;charset:utf-8",
        },
        data: params,
        method: "POST"
      });
      return res;
    } catch (error) {
      return error;
    }
  }